package com.css.dzj.zfjg.modules.supervisioncompinfo.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "JG_TSJB_ACCESSORY", schema = "DZJZFJG", catalog = "")
public class JgTsjbAccessoryEntity {
    private String uniqueId;
    private String fileName;
    private String fileType;
    private String filePath;
    private String fileSource;
    private String registerCode;
    private String processCode;

    @Id
    @Column(name = "Unique_ID")
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.zfjg.common.util.SnowflakeId")
    public String getUniqueId() {
        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    @Basic
    @Column(name = "File_Name")
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Basic
    @Column(name = "File_Type")
    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    @Basic
    @Column(name = "File_Path")
    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Basic
    @Column(name = "File_Source")
    public String getFileSource() {
        return fileSource;
    }

    public void setFileSource(String fileSource) {
        this.fileSource = fileSource;
    }

    @Basic
    @Column(name = "Register_Code")
    public String getRegisterCode() {
        return registerCode;
    }

    public void setRegisterCode(String registerCode) {
        this.registerCode = registerCode;
    }

    @Basic
    @Column(name = "Process_Code")
    public String getProcessCode() {
        return processCode;
    }

    public void setProcessCode(String processCode) {
        this.processCode = processCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JgTsjbAccessoryEntity that = (JgTsjbAccessoryEntity) o;
        return Objects.equals(uniqueId, that.uniqueId) &&
                Objects.equals(fileName, that.fileName) &&
                Objects.equals(fileType, that.fileType) &&
                Objects.equals(filePath, that.filePath) &&
                Objects.equals(fileSource, that.fileSource) &&
                Objects.equals(registerCode, that.registerCode) &&
                Objects.equals(processCode, that.processCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uniqueId, fileName, fileType, filePath, fileSource, registerCode, processCode);
    }
}
